package dbhandler.handler;

import dbhandler.ResultSetHandler;
import dbhandler.Row;

import java.sql.ResultSet;
import java.sql.SQLException;
import java.util.ArrayList;
import java.util.List;

public class ArrayListHandler implements ResultSetHandler<List<Object[]>> {
    public List<Object[]> handler(ResultSet rs) throws SQLException {
        List<Object[]> list=new ArrayList<Object[]>();
        while(rs.next()){
            list.add(Row.toArray(rs));
        }
        return list;
    }
}
